package com.zch.rpc.service.serviceImpl;

import com.zch.rpc.client.annotation.RpcService;
import com.zch.rpc.client.common.entity.Person;
import com.zch.rpc.client.interfaces.PersonService;
//类似dubbo注解的方式将服务注册上去。
@RpcService(PersonService.class)
public class PersonServiceImpl implements PersonService{

	public Person getInfo() {
		Person person = new Person();
		person.setAge(22);
		person.setName("楚休红");
		person.setSex("男");
		return person;
	}

	public boolean printInfo(Person person) {
		if(person != null){
			System.out.println(person);
			return true;
		}
		return false;
	}

}
